<?php
// 提交修改个人信息
// header("content-type:text/html;charset=UTF-8");
include_once("conn.php");

$a_ID = $_POST["adminID"];
$a_Name = $_POST["adminName"];

$update = "UPDATE admin_infos SET admin_Name = '" . $a_Name . "' WHERE admin_ID = '" . $a_ID . "'";

if (mysqli_query($connect_DB, $update)) {
    // 退出登录
    if (!session_id()) {
        session_start();
    }
    session_unset();
    session_destroy();
    echo "<script>alert('修改信息成功！重新登录同步信息！');location='admin_login.html';</script>";
} else {
    echo "<script>alert('修改信息失败！请稍后重试！');history.go(-1);</script>";
}

$connect_DB->close();

?>